package com.yidi.system.service;

import com.yidi.common.core.domain.TreeSelect;
import com.yidi.common.core.domain.entity.SysMenu;
import com.yidi.common.core.service.BaseService;
import com.yidi.system.domain.vo.RouterVo;

import java.util.List;
import java.util.Set;

/**
 * @author ：Xn
 * @ClassName: SysMenuService
 * @date ：2021-10-19 14:37
 * @describe ：
 */
public interface SysMenuService extends BaseService<SysMenu> {

    List<SysMenu> selectMenuList(SysMenu menu, Long userId);

    List<SysMenu> selectMenuTreeByUserId(Long userId);

    List<RouterVo> buildMenus(List<SysMenu> menus);

    List<TreeSelect> buildMenuTreeSelect(List<SysMenu> menus);

    List<SysMenu> buildMenuTree(List<SysMenu> menus);

    List<Integer> selectMenuListByRoleId(Long roleId);

    String checkMenuNameUnique(SysMenu menu);

    boolean hasChildByMenuId(Long menuId);

    boolean checkMenuExistRole(Long menuId);

    Set<String> selectMenuPermsByUserId(Long userId);
}
